<template>
  <div class="page">


      <el-input
        type="textarea"
        rows="10"
        placeholder="请输入内容" v-model="input"   style="width: 30%;">
        </el-input>
    <div style="margin: 10px 0;"></div>

    <el-button type="primary" @click="goPay" :loading="loadingPay"
      >搜索</el-button
      >
    <el-button size="small" type="primary">
      <a v-bind:href="url" target="_blank">
        下载文件
      </a>
    </el-button>
  </div>
</template>
<script>

import {
  getPython,
} from "@/api/cexpressorder/sendServer/index";
import * as url from "url";


export default {
  components: {
  },

  data() {
    return {
      input : "",
      url : "",
      loadingPay:false
    };
  },
  mounted() {
      },
  methods: {
    goPay() {
      this.loadingPay = true;
      getPython({ params: this.input})
        .then((res) => {
          this.url = "http://b.ahjttd.com:8000/exe/download?path="+res[0];
          console.log("-----",this.url)
          this.loadingPay = false;
          // window.location.href = res.data;
        })
        .catch((err) => {
           this.loadingPay = false;
          console.log(err);
        });
    },
    toChangeTime() {
      this.$refs.timeChangeDig.showDialog(this.reslut.id);
    }
  },
};
</script>
<style scoped lang="scss">
.page {
  padding: 10px 10px 10px;
}
</style>
